﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace LMIS_Application
{
    public partial class AddBooks : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnAddBook_Click(object sender, EventArgs e)
        {
            Book b = new Book();
            bool ra = b.addBook(tb_AB_BName.Text, tb_AB_Author.Text, Convert.ToInt32(tb_AB_Year.Text));

            if (ra)
            {
                info.Text = "Book '" + b.getTitle() + "' was added!\nBook Number is " + b.getID();
            }
            else
            {
                info.Text = "Book '" + b.getTitle() + "' was not Added";
            }

        }
    }
}
